/* 基础样式 */
:root {
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
    --primary-color: #2c3e50;
}

/* 侧边导航核心样式 */
.sidebar {
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-color);
    transition: transform var(--transition-speed) ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.nav-menu {
    list-style: none;
    padding: 15px 0;
}

.nav-item {
    position: relative;
    margin: 8px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1 !important;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #34495e;
}

/* 响应式交互 */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    }

    .main-content::after {
        content: "";
        position: fixed;
        top:0; left:0; right:0; bottom:0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        transition: opacity 0.3s;
    }
}

/* 子菜单动画 */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.active {
    max-height: 500px;
}

.submenu li {
    padding-left: 45px;
}

/* 折叠按钮动画 */
.toggle-btn.rotated {
    transform: rotate(180deg);
}